Skip to content

refactor: extract step output utilities#285

Open
paralizeer wants to merge 7 commits intosnarktank:mainfrom
paralizeer:refactor/extract-step-output-utils
Open

refactor: extract step output utilities#285
paralizeer wants to merge 7 commits intosnarktank:mainfrom
paralizeer:refactor/extract-step-output-utils

Conversation

@paralizeer
Copy link

Extracted pure utility functions from step-ops.ts to lib/step-output.ts for better code organization. TypeScript compiles and build passes. Backwards compatibility maintained.

Claw and others added 7 commits March 2, 2026 01:50
Add dryRunWorkflow() function that:
- Validates workflow YAML via loadWorkflowSpec()
- Builds execution context with placeholder values
- Resolves all step input templates using resolveTemplate()
- Prints execution plan showing all steps with agent assignments
- Returns without creating DB entries or spawning crons

Update CLI to call dryRunWorkflow when --dry-run flag is passed to
'workflow run' command.

Tested with coding-sprint and bug-fix workflows.
…ntfarm workflow CLI. When passed to 'workflow run', it should validate the workflow YAML, resolve all template variables with placeholder values, print the execution plan (steps, agents, order), and exit without actually creating a run or spawning any agents. Should work for all workflows (coding-sprint, bug-fix, feature-dev, security-audit).
- Add safety reset in claimStep: if step is running but has no current_story_id, reset to pending
- Add current_story.* context keys for template usage
- Set defaults for reviewer template keys (commit, test_result)
- Add logging to checkLoopContinuation for debugging
- Update all workflow YAMLs from 'default' to 'minimax/MiniMax-M2.5'
- Add memory access to developer/planner/reviewer/tester agents
- Add new prospector workflows: eps-prospector, local-prospector, job-scout, gran-concepcion-prospector

Addresses: snarktank#272 (story loop stuck), snarktank#266 (stall after Story 1)
Auto-generated by Openclaw AutoDev
The workflow YAMLs were updated to use 'minimax/MiniMax-M2.5' instead
of 'default' (commit 021244b), but the tests still expected 'default'.
This caused 4 test failures in the polling configuration tests.

Updated test expectations in:
- tests/bug-fix-polling.test.ts
- tests/feature-dev-polling.test.ts
- tests/security-audit-polling.test.ts
- tests/polling-timeout-sync.test.ts

Auto-generated by Openclaw AutoDev
The DEFAULT_POLLING_MODEL was set to 'default' which is not a valid
model identifier for sessions_spawn. This caused agent cron jobs to
fail silently - they would fire but the sessions would not complete
because the model was invalid.

Changed both occurrences of 'default' to 'minimax/MiniMax-M2.5'
which matches the default model in OpenClaw config and the workflow YAMLs.

Fixes issue snarktank#217 - Agent cron jobs spawn sessions but work does not complete
Extracted pure utility functions from step-ops.ts (1202 -> 1058 lines):
- parseOutputKeyValues: parse KEY: value output format
- resolveTemplate: resolve {{placeholder}} templates
- findMissingTemplateKeys: find missing template variables

These functions have no DB or external dependencies, making them
suitable for extraction to the shared lib/ directory.

Backwards compatibility maintained via re-export in step-ops.ts.

Auto-generated by Openclaw AutoDev
@vercel
Copy link

vercel bot commented Mar 6, 2026

@paralizeer is attempting to deploy a commit to the Ryan Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant